import request from '@/utils/request_zc'

export function getPurchaseContractList ({
  page,
  limit,
  contractNo,
  supplierId,
  requestNo,
  signStartDate,
  signEndDate,
  applyUser,
  applyStartDate,
  applyEndDate,
  applyStatus,
  approveUser,
  approveStartDate,
  approveEndDate,
  approveStatus
}) {
  return request({
    url: '/scm/purchase/contract/list',
    method: 'get',
    params: {
      limit,
      page,
      contractNo,
      supplierId,
      requestNo,
      signStartDate,
      signEndDate,
      applyUser,
      applyStartDate,
      applyEndDate,
      applyStatus,
      approveUser,
      approveStartDate,
      approveEndDate,
      approveStatus
    }
  })
}


export function PurchaseContractApprove ({ approveStatus, id, approveAdvice }) {
  return request({
    url: '/scm/purchase/contract/approve',
    method: 'post',
    data: {
      approveStatus,
      id,
      approveAdvice
    }
  })
}

export function getSupplierList () {
  return request({
    url: '/scm/purchase/supplier/list',
    method: 'get',
  })
}